﻿using Behavioral;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Calculator.MSTest
{
    public class ResultShouldEqual : IAssertion<Calculator, int>
    {
        public ResultShouldEqual(int expected)
        {
            this.expected = expected;
        }

        public void Verify(Calculator target, int returnValue)
        {
            Assert.IsNotNull(target);
            Assert.AreEqual(this.expected, returnValue);

            Assert.AreEqual(int.MaxValue, this.GetContext<int>());
            Assert.AreEqual(1, this.GetContext<int>("one"));
            Assert.AreEqual(2, this.GetContext<int>("two"));
            Assert.AreEqual(3, this.GetContext<int>("three"));
        }

        private int expected;
    }
}
